<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>API测试页面</title>
    <style>
        body {
            font-family: Arial, sans-serif;
            max-width: 800px;
            margin: 0 auto;
            padding: 20px;
            background-color: #f5f5f5;
        }
        .container {
            background: white;
            padding: 20px;
            border-radius: 8px;
            box-shadow: 0 2px 4px rgba(0,0,0,0.1);
            margin-bottom: 20px;
        }
        .test-item {
            margin: 10px 0;
            padding: 10px;
            border: 1px solid #ddd;
            border-radius: 4px;
        }
        .success { background-color: #d4edda; border-color: #c3e6cb; color: #155724; }
        .error { background-color: #f8d7da; border-color: #f5c6cb; color: #721c24; }
        .loading { background-color: #fff3cd; border-color: #ffeaa7; color: #856404; }
        button {
            background-color: #007bff;
            color: white;
            border: none;
            padding: 8px 16px;
            border-radius: 4px;
            cursor: pointer;
            margin: 5px;
        }
        button:hover { background-color: #0056b3; }
        #results { margin-top: 20px; }
    </style>
</head>
<body>
    <div class="container">
        <h1>Tete1 Git同步系统 - API测试页面</h1>
        <div id="test-info">
            <p>正在加载...</p>
        </div>
    </div>

    <div class="container">
        <h2>API连接测试</h2>
        <button onclick="testSystemInfo()">测试系统信息API</button>
        <button onclick="testTasksAPI()">测试任务API</button>
        <button onclick="testReposAPI()">测试仓库API</button>
        <button onclick="testAllAPIs()">测试所有API</button>

        <div id="results"></div>
    </div>

    <script src="/js-test.js"></script>
    <div id="test-result"></div>
</body>
</html>